﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Frogism.Core {
  public static class IEnumerableExtension {
    public static System.Collections.ObjectModel.Collection<T> ToCollection<T>(this IEnumerable<T> collection) {
      //System.Collections.ObjectModel.Collection<T> list = new System.Collections.ObjectModel.Collection<T>();
      //foreach(T t in collection) {
      //  list.Add(t);
      //}

      return new System.Collections.ObjectModel.Collection<T>(collection.ToList());
    }
  }
}
